Azure AI Face API (preview:v1.2.1)

2025/07/25 • 2 updated methods

LivenessSessionOperations_CreateLivenessSession (updated)
Description A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. Permissions includes... > * * A token lifetime of 10 minutes. > [!NOTE] > Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries.
Reference Link ¶

⚶ Changes

{
  "#id": "LivenessSessionOperations_CreateLivenessSession",
  "Description": {
    "new": "A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired.\n\nPermissions includes...\n>\n*\n  * A token lifetime of 10 minutes.\n\n> [!NOTE]\n> Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries.",
    "old": "A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired.\n\nPermissions includes...\n>\n*\n  * Ability to call /detectLiveness/singleModal for up to 3 retries.\n  * A token lifetime of 10 minutes.\n\n> [!NOTE]\n> Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries."
  }
}

⚼ Request

POST:  /detectLiveness/singleModal/sessions
{
body:
{
livenessOperationMode: enum ,
sendResultsToClient: boolean ,
deviceCorrelationIdSetInClient: boolean ,
enableSessionImage: boolean ,
livenessSingleModalModel: enum ,
deviceCorrelationId: string ,
authTokenTimeToLiveInSeconds: integer ,
}
,
}

⚐ Response (200)

{
sessionId: string ,
authToken: string ,
}

⚐ Response (default)

{
$headers:
{
x-ms-error-code: string ,
}
,
$schema:
{
error:
{
code: string ,
message: string ,
}
,
}
,
}
LivenessSessionOperations_CreateLivenessWithVerifySessionWithVerifyImage (updated)
Description A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. Permissions includes... > * * A token lifetime of 10 minutes. > [!NOTE] > > * > * Client access can be revoked by deleting the session using the Delete Liveness With Verify Session operation. > * To retrieve a result, use the Get Liveness With Verify Session. > * To audit the individual requests that a client has made to your resource, use the List Liveness With Verify Session Audit Entries. Recommended Option: VerifyImage is provided during session creation.
Reference Link ¶

⚶ Changes

{
  "#id": "LivenessSessionOperations_CreateLivenessWithVerifySessionWithVerifyImage",
  "Description": {
    "new": "A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired.\n\nPermissions includes...\n>\n*\n  * A token lifetime of 10 minutes.\n\n> [!NOTE]\n>\n> *\n>   * Client access can be revoked by deleting the session using the Delete Liveness With Verify Session operation.\n>   * To retrieve a result, use the Get Liveness With Verify Session.\n>   * To audit the individual requests that a client has made to your resource, use the List Liveness With Verify Session Audit Entries.\n\nRecommended Option: VerifyImage is provided during session creation.",
    "old": "A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired.\n\nPermissions includes...\n>\n*\n  * Ability to call /detectLivenessWithVerify/singleModal for up to 3 retries.\n  * A token lifetime of 10 minutes.\n\n> [!NOTE]\n>\n> *\n>   * Client access can be revoked by deleting the session using the Delete Liveness With Verify Session operation.\n>   * To retrieve a result, use the Get Liveness With Verify Session.\n>   * To audit the individual requests that a client has made to your resource, use the List Liveness With Verify Session Audit Entries.\n\nRecommended Option: VerifyImage is provided during session creation."
  }
}

⚼ Request

POST:  /detectLivenessWithVerify/singleModal/sessions
{
Parameters: string ,
VerifyImage: file ,
}

⚐ Response (200)

{
sessionId: string ,
authToken: string ,
verifyImage:
{
faceRectangle:
{
top: integer ,
left: integer ,
width: integer ,
height: integer ,
}
,
qualityForRecognition: enum ,
}
,
}

⚐ Response (default)

{
$headers:
{
x-ms-error-code: string ,
}
,
$schema:
{
error:
{
code: string ,
message: string ,
}
,
}
,
}